<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./OL_SDK/include-openlayers-local.js"></script>
    <script src="./libs/gaode.js"></script>
</head>

<body>
    <div id="map">
    </div>
    <script>
        var map = new ol.Map({
            target: "map",
            layers: [gaode],
            view: new ol.View({
                projection: 'EPSG:4326',
                center: [114.30, 30.50],
                zoom: 4
            })
        })
        /* 空图层 layer-source */
        const source = new ol.source.Vector({})
        const layer = new ol.layer.Vector({

        })
        console.log(layer)
        layer.setSource(source)
        layer.setMap(map);
        /* 圆要素 */
        /* 1、创建圆要素 */
        const circle = new ol.Feature({
            /* 第一个参数 中心点 第二个参数 半径  */
            geometry: new ol.geom.Circle([114.30, 30.50], 2)
        })
        /* 2、设置样式 */
        const style = new ol.style.Style({
            fill: new ol.style.Fill({
                color: "rgba(255,255,255,0.4)"
            }),
            stroke: new ol.style.Stroke({
                color: "#333",
                width: 2
            })
        })
        // circle.setStyle(style)

        source.addFeature(circle)
        layer.setStyle(style)
    </script>
</body>

</html>